package com.example.demo.entity;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.nio.charset.Charset;

/**
 * @author ChenYongHao
 * @date 2023/3/2 14:57
 * @desc
 */
@Component
@ConfigurationProperties( prefix = "spring.thymeleaf")
@Data
/*
查看一下Thymeleaf的自动配置类：ThymeleafProperties
我们可以在其中看到默认的前缀和后缀!
我们只需要把我们的html页面放在类路径下的templates下，thymeleaf就可以帮我们自动渲染了。
使用thymeleaf什么都不需要配置，只需要将他放在指定的文件夹下即可!
 */
public class ThymeleafProperties {
    private static Charset DEFAULT_ENCODING;
    public static final String DEFAULT_PREFIX = "classpath:/templates/"; public static final String DEFAULT_SUFFIX = ".html";
    private boolean checkTemplate = true;
    private boolean checkTemplateLocation = true;
    private String prefix = "classpath:/templates/";
    private String suffix = ".html";
    private String mode = "HTML";
    private Charset encoding;
}

